<template>
  <div>
    <admin-home v-if="isadmin"></admin-home>
    <editor-home v-if="iseditor"></editor-home>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import AdminHome from "./components/home.vue";
import EditorHome from "./components/homeEditor.vue";
import { loginStore } from "@/store/index";
const store = loginStore();
export default defineComponent({
  components: {
    AdminHome,
    EditorHome,
  },
  computed: {
    isadmin() {
      return this.$route.path == '/home' && store.userInfo.auth == 'admin';
    },
    iseditor(){
      return this.$route.path == '/home' && store.userInfo.auth == 'editor';
    }
  },
  data() {
    return {};
  },
  mounted() {
  },
});
</script>

<style scoped>
</style>